/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controleur;

import application.Facade;
import application.MembreBean;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author James
 */
public class CommandeAfficherMembresListe implements Commande{
    private String next;

    public CommandeAfficherMembresListe(String next) {
        this.next = next.toLowerCase();
    }

    @Override
    public String executer(HttpServletRequest req, HttpServletResponse res) throws CommandeException {
        Facade f = new Facade();
        List<MembreBean> membresBeanListe = f.getMembres();

        req.setAttribute(ConstantesWeb.VALEUR_MEMBRES_LISTE, membresBeanListe);
        
        return next;
    }
}
